Creating an OLAP Database
Remember
that an OLAP database is made up of data sources, dimensions, and
cubes. A data source is simply a pointer to data somewhere, such as via
a Jet OLE DB provider, an OLE DB provider, SQL Native Client, Microsoft
Directory Services, or even SSIS packages. You populate the data in
your cube from the data source. Dimensions are constructed of columns
from tables that you select to be used to build and filter data cubes.
Cubes are combinations of dimensions whose intersections contain
strategically significant measures of business performance, such as
quantities, units, amounts, and so on. You need to identify the data
sources from which your OLAP cube is to be based.
Adding a Data Source
To add data sources for a
new database, you simply right-click the Data Sources object in the
Solution Explorer or select Project, New Data Source in Visual Studio.
The Data Source Wizard is then initiated. As mentioned earlier, much of
SSAS administration is wizard based. The Data Source Wizard starts with
a prompt for you to select how to define the connection to a data
source. You can use any existing connections or create new ones from
this dialog. Figure 4 shows these two options, along with the data connection properties. If you have attached the CompSales database (or any other database) already, you can easily create a new connection to this database for use in this example.
Figure 5
shows the Connection Manager dialog, where you specify the provider to
use (for example, Native OLE DB\SQL Native Client 10.0), the name of
the database to connect to, and the authentication method to use for
the connection. You should go ahead and establish a connection to the CompSales
database you just attached and click the Test Connection button in the
lower-left corner to verify that it is valid. If you have referenced
the CompSales2008 database from Visual Studio before, it may already appear in the Data Connections list.
As part of this
connection specification wizard sequence, you must specify the
impersonation information. That is, you must define what credentials
SSAS should use to connect to the data source. You can specify a
specific username and password, use the service account, use the
credentials of the current user, or use default authentication. You can
also create a specialized domain account to use for all SSAS
connections. We recommend using the service account approach, which is
easily leveraged for most cube administration.
To finish, you must name the data source Comp Sales2008
and then click the Finish button. Your data source then appears in the
Solution Explorer, under Data Sources. As part of this process, an XML
file is created, from which you can easily manage all connection
properties for this data source (Comp Sales2008.ds in this example). Remember that you have just established connection information only—nothing more. If you right-click the Comp Sales2008.ds entry under the Data Sources object, you can view the complete XML code of this entry by selecting the View Code option.
The following XML code represents this data source connection:
<DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ddl2="http://schemas.microsoft.com/
analysisservices/2003/engine/2"
xmlns:ddl2_2="http://schemas.microsoft.com/
analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/
analysisservices/2008/engine/100/100" xmlns:ddl200_200="
http://schemas.microsoft.com/
analysisservices/2010/engine/200/200" xmlns:dwd="http://schemas.microsoft.com/
DataWarehouse/Designer/1.0"
xsi:type="RelationalDataSource"
dwd:design-time-name="59d9b6d8-4394-40a9-b793-13fd819b892f"
xmlns="http://schemas.microsoft.com/
analysisservices/2003/engine">
<ID>Comp Sales2008</ID>
<Name>Comp Sales2008</Name>
<CreatedTimestamp>0001-01-01T00:00:00Z</CreatedTimestamp>
<LastSchemaUpdate>0001-01-01T00:00:00Z</LastSchemaUpdate>
<ConnectionString>Provider=SQLNCLI10.1;
Data Source=DBARCH-LT2\SQL08DE01;
Integrated Security=SSPI;Initial Catalog=CompSales2008
</ConnectionString>
<ConnectionStringSecurity>Unchanged</ConnectionStringSecurity>
<ImpersonationInfo>
<ImpersonationMode>ImpersonateAccount</ImpersonationMode>
<Account>DBARCH-LT2\DBARCH</Account>
<ImpersonationInfoSecurity>PasswordRemoved</ImpersonationInfoSecurity>
</ImpersonationInfo>
<Timeout>PT0S</Timeout>
</DataSource>
You can also choose the
View Designer option on this data source entry, which allows you to
view and modify the properties of the data source entry.